package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/10/25.
 * Des:
 */
public class SysRoleEnums {
    public enum TYPE {
        FIND("查看", "1"), SAVE("增加", "2"),EDIT("编辑","3"),DEL("删除","4");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private TYPE(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (TYPE type : TYPE.values()) {
                if (type.getState().equals(state)) {
                    return type.getName();
                }
            }
            return "";
        }
    }

}
